// **********************************************************************
//
// This class is a C++ wrapper around the C implementation contained in
// MD5I.cpp, obtained from http://sourceforge.net/projects/libmd5-rfc/.
//
// **********************************************************************

#ifndef KITTY_UTIL_MD5_H
#define KITTY_UTIL_MD5_H


extern "C"
{
struct md5_state_s;
}

namespace kitty
{
namespace util
{

class MD5
{
public:

    MD5();
    MD5(const unsigned char*, int);
    ~MD5();

    void update(const unsigned char*, int);
    void finish();

    void digest(unsigned char*) const;

private:

    md5_state_s* state_;
    unsigned char digest_[16];
};

}
}
#endif

